import sys
import time
import string
from com.android.monkeyrunner import MonkeyRunner as mr
from com.android.monkeyrunner import MonkeyDevice as md
from com.android.monkeyrunner import MonkeyImage as mi

from com.android.monkeyrunner.easy import EasyMonkeyDevice
from com.android.monkeyrunner.easy import By

def main():
	id = sys.argv[1]
	device = mr.waitForConnection(30, id)
	x1 = string.atoi(sys.argv[2])
	y1 = string.atoi(sys.argv[3])
	x2 = string.atoi(sys.argv[4])
	y2 = string.atoi(sys.argv[5])
	device.drag((x1,y1),(x2,y2), 0.5, 10)

if __name__ == '__main__':
    main()